package com.aaa.operations.service.impl;

import com.aaa.common.entity.Repair;
import com.aaa.operations.dao.RepairDao;
import com.aaa.operations.service.RepairService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2020-08-04
 */
@Service
@Transactional
public class RepairServiceImpl extends ServiceImpl<RepairDao, Repair> implements RepairService {

    @Autowired
    private RepairDao repairDao;
    @Override
    public PageInfo getAllRepair(Integer pageSize, Integer pageNum,Map map) {

        PageHelper.startPage(pageNum,pageSize);
        List<Repair> list = repairDao.getAllRepair(map);

        PageInfo pageInfo = new PageInfo(list);

        return pageInfo;
    }
}
